home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 7 / FM Towns Free Software Collection 7.iso / data / nyan_e2 / nyane2_u.plp < prev    next >
Text File  |  1993-11-30  |  6KB  |  246 lines

  1. /********  フォーラム, HP , メールに, メッセージをアップする v1.04a用 ********/
  2.     %UpText{
  3.     %UpOne{
  4.         %UpTitle{getchar(IndexLine,32,80)};
  5.         %UpBody{
  6.             %fno @head(@getchar(IndexLine,4,3),{ });
  7.             send( FNameTop|{MES}|fno|{.TXT});
  8.             type({\n/POST\n});
  9.             loop({
  10.                 wait(60,{TimeOut},
  11.                   {題名 (漢字で20文字まで)\n:}
  12.                     ,{type(@UpTitle);
  13.                       im({Yes})},
  14.         {宛先 (IDか同報グループ名又は FAX番号 改行で終了)\n:}
  15.                     ,{type(@getchar(IndexLine,14,8)|{\n});
  16.                       wait(30,{TimeOut},{\n:});
  17.                       type({\n});
  18.                       im({Yes})},
  19.         {宛先 (例 abc@cc.xyz.ac.jp 改行で終了)\n:}
  20.                     ,{type(@UpTitle);
  21.                       wait(30,{TimeOut},{\n:});
  22.                       type({\n});
  23.                       im({Yes})},
  24.                   {(1:OK  2:NG)\n:}
  25.                     ,{type({1\n});im({Yes})},
  26.                   {◆登録されていません◆}
  27.                     ,{wait(30,{TimeOut},{\n:});
  28.                       type({\n});
  29.                       im({No})},
  30.                   {処理)\n>}    ,{type({\n});im({Yes})},
  31.                   {\n-送信完了-}
  32.                         ,{cond:={了}; im({No})},
  33.                   {\n-登録完了-}
  34.                         ,{cond:={了}; im({No})},
  35.                   {\n修正 (1:修正する 2:しない)\n:}
  36.                         ,{type({2\n});im({Yes})},
  37.                   {\n登録 (1:登録する  2:しない)\n:}
  38.                         ,{type({1\n});
  39.                           cond:={了};
  40.                           im({No})}
  41.                 )
  42.             });
  43.         };
  44.         %UpForum{
  45.             var flag[4];
  46.             %ResNum        @getchar(IndexLine,26,5);
  47.             %ReqForum    @getchar(IndexLine,14,8);
  48.             %ReqMes        @getchar(IndexLine,23,2);
  49.             %ReqDest    @getchar(IndexLine,26,3);
  50.  
  51.             %UpBUL{
  52.                 test(,{    type({BUL\n});
  53.                     wait(30,{TimeOut},{\nBBS>});
  54.                 },{\nBBS>},{
  55.                 });
  56.                 %time @getchar(@daylong,16,5)|{ };
  57.                 type({COM}|{\n});
  58.                 wait(30,{TimeOut},{で/E) \n});
  59.                 type({SUB:}|time|@UpTitle);
  60.                 UpBody;
  61.                 wait(130,{TimeOut},{\nBBS>});
  62.                 case(cond,{了},{cond:={済}});
  63.             };
  64.             %upccs1{
  65.                 case(FMesNO<>ReqMes,
  66.                 {Yes},{    case(FMesNO<>{},{Yes},{
  67.                         type({RX }|ReqMes|{\n});
  68.                         FMesNO:=ReqMes;
  69.                         wait(30,{TimeOut},{\nCCS(N)>},,
  70.                             {\nCCS(P)>});
  71.                     });
  72.                 });
  73.             };
  74.             %upccs2{
  75.                 %Say {
  76.                     type({SAY\n});
  77.                     wait(30,{TimeOut},{\n:},{type({1\n})},
  78.                         {\n-登録個数が});
  79.                 };
  80.                 case( ResNum ,
  81.                 {     },{ Say;
  82.                 },,{ type({RE }|ResNum|{\n});
  83.                 });
  84.                 loop({
  85.                     wait(30,{TimeOut},
  86.                     {/E)\n},{
  87.                         im({No});
  88.                     },{発言はありません◆\n},{
  89.                         Say; im({Yes});
  90.                     },{登録出来ません-\n},{
  91.                         flag:={No}; im({No});
  92.                     });
  93.                 });
  94.                 case(flag,
  95.                 {Yes},{    type({SUB:}|@UpTitle);
  96.                     UpBody;
  97.                     case(cond,{了},{cond:={済}});
  98.                 },{No},{cond:={保};
  99.                 });
  100.                 wait(150,{TimeOut},{\nCCS(N)>},,{\nCCS(P)>});
  101.             };
  102.             %UpCCS{
  103.                 flag:={Yes};
  104.                 test(,{
  105.                 type({MES }|ReqMes|{\n});
  106.                 Where3:={MES};
  107.                 FMesNO:=ReqMes;
  108.                 wait(30,{TimeOut},{\nCCS(N)>},,{\nCCS(P)>});
  109.                 },{\nCCS(N)>},{ upccs1;
  110.                 },{\nCCS(P)>},{ upccs1;
  111.                 });
  112.                 test(,,{\nCCS(N)>},{upccs2},{\nCCS(P)>},{upccs2});
  113.             };
  114.  
  115.             case(Where1<>{FORUM} || Where2<>ReqForum,
  116.             {Yes},{    %ForumDir logd|{\}|@head(ReqForum,{ });
  117.                 GoForum(ReqForum);
  118.             });
  119.             case(ReqDest={BUL},
  120.             {Yes}, { UpBUL;
  121.             },{No},{ UpCCS;
  122.             });
  123.         };
  124.         %UpHP{
  125.             var HPData[30];
  126.             %name @head(@getchar(IndexLine,14,8),{ });
  127.             HPData:=@tail(@body(hp,,{/}|name|{,}),{,});
  128.             case(HPData={},{Yes},{
  129.                 HPData:=@tail(@body(hp,,{/}|name),{,});});
  130.             %HPID   @head(HPData,{/});
  131.             %HPPass @body(HPData,{/});
  132.             case(HPID<>{},
  133.             {Yes},{
  134.                 case(Where1={HP} && Where2=HPID,{No},{
  135.                     GoHPpatio({HP},HPID,HPPass);
  136.                 });
  137.                 test(,,{\nHP>},{
  138.                     type({WRITE\n});
  139.                     wait(30,{TimeOut},{\n:});
  140.                     type(@UpTitle);
  141.                     wait(30,{TimeOut},{\n:});
  142.                     type({1\n});
  143.                     wait(30,{TimeOut},{/E)\n});
  144.                     UpBody;
  145.                     wait(130,{TimeOut},{\nHP>});
  146.                     case(cond,{了},{cond:={済}});
  147.                 });
  148.             },{No},{cond:={予};
  149.             });
  150.         };
  151.         %UpMail{[Attr]
  152.             var Add[5];
  153.             case(Attr,{VAN},{Add:={PCV>}},,{Add:={}});
  154.             %UpMail2{
  155.                 wait(30,{TimeOut},{/E)\n});
  156.                 type({SUB:}|@UpTitle);
  157.                 type({TO:}|Add|@getchar(IndexLine,14,8)|{\n});
  158.                 case(@body(Handle,{,})={} && @tail(Handle,{/})<>{}
  159.                  && @body(Handle,,{/})={},{Yes},{
  160.                     type({FROM:}|@tail(Handle,{/})|{\n});
  161.                 });
  162.                 wait(30,{TimeOut},{\n});
  163.                 UpBody;
  164.             };
  165.             case(Smail={},
  166.             {Yes}, {case(Where1<>{MAIL},{Yes},{GoMail});
  167.             },{No},{case(Where1<>{FORUM} || Where2<>Smail,{Yes},{
  168.                     %ForumDir logd|{\}|@head(Smail,{ });
  169.                     GoForum(Smail);
  170.                 });
  171.             });
  172.             test(,,{\nMAIL>},{
  173.                 type({COM\n});
  174.                 UpMail2;
  175.                 wait(60,{TimeOut},{\nMAIL>}); 
  176.                 case(cond,{了},{cond:={済}});
  177.             },{\nFORUM>},{
  178.                 type({SMAIL\n});
  179.                 UpMail2;
  180.                 wait(60,{TimeOut},{\nFORUM>}); 
  181.                 case(cond,{了},{cond:={済}});
  182.             });
  183.         };
  184.  
  185. /**********  Main Routine   **********/
  186.         var cond[2];
  187.         %WriteIndex{
  188.             write(SaveFName,IndexLine);
  189.             im({Yes});
  190.         };
  191.         delfile(SaveFName);
  192.         fopen(IndexFName);
  193.         loop({    IndexLine:=@fread;
  194.             case(@getchar(IndexLine,1,2),
  195.             {予},{    %fno @head(@getchar(IndexLine,4,3),{ });
  196.                 cond:={誤};
  197.                 case(@filechk(FNameTop|{MES}|fno|{.TXT}),
  198.                 {Yes},{    case(@getchar(IndexLine,8,5),
  199.                       {Forum},{UpForum;
  200.                     },{HP   },{UpHP;
  201.                     },{Mail },{UpMail({NIF});
  202.                     },{PCVAN},{UpMail({VAN});
  203.                     },{BMail},{cond:={予}; next:={Yes};
  204.                     },{MyPrf},{cond:={予}; next:={Yes};
  205.                     },{Patio},{cond:={予}; next:={Yes};
  206.                     },{FAX  },{cond:={予}; next:={Yes};
  207.                     },{WPNC },{cond:={予}; next:={Yes};
  208.                     },{Read },{cond:={予};
  209.                     },,{display({Invelid Dest. dest:}|
  210.                         @getchar(IndexLine,8,5)|{.\n});
  211.                     });
  212.                     IndexLine:=cond|
  213.                         @getchar(IndexLine,3,80);
  214.                     WriteIndex;
  215.                 },{No},{
  216.                     case(@getchar(IndexLine,8,5)={LIB  } ||
  217.                      @getchar(IndexLine,8,5)={Prof } ||
  218.                      @getchar(IndexLine,8,5)={List } ||
  219.                      @getchar(IndexLine,8,5)={RTN  } ||
  220.                      @getchar(IndexLine,8,5)={NEW  },
  221.                     {Yes},{WriteIndex;
  222.                     },{No},{
  223.                     display({UpFile not found. No.:}|
  224.                         fno|{.\n});
  225.                     WriteIndex;
  226.                     });
  227.                 });
  228.             },{説},{WriteIndex;
  229.             },{保},{WriteIndex;
  230.             },{覧},{WriteIndex;
  231.             },{済},{WriteIndex;
  232.             },{誤},{WriteIndex;
  233.             },    ,{im({No})
  234.             });
  235.         });
  236.         fclose;
  237.         copyfile(SaveFName,IndexFName);
  238.     };
  239.  
  240.     footnote({ 文書のアップ処理をしています});
  241.     code({sjis});
  242.     case(@filechk(IndexFName),{Yes},{UpOne});
  243.     };
  244. next:={No};
  245. UpText;
  246.